package top.wshape1.shiziapi.project.feign;

import feign.Request;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import top.wshape1.shiziapi.common.domain.to.SummaryDocReqTo;
import top.wshape1.shiziapi.common.utils.R;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2023-09-14
 */

@FeignClient("shiziapi-thirdparty")
public interface ThirdPartyFeignService {

    @PostMapping("/cover/uploadByBytes")
    R<Object> uploadCoverByBytes(@RequestParam("id") Long projectId,
                                 @RequestParam("suffix") String suffix,
                                 @RequestBody byte[] bytes);


    @PostMapping("/image/uploadByBytes")
    R<Void> uploadImageByBytes(@RequestParam("suffix") String suffix,
                               @RequestBody byte[] bytes);

    @PostMapping("/chatAi/summaryDoc")
    R<String> summaryDoc(Request.Options options, @RequestBody SummaryDocReqTo summaryDocReqTo);

}
